Rework locking for sched_adjust.
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 4 Jan 2012 16:12:44 +0000 (16:12 +0000)
committerDario Faggioli <dario.faggioli@citrix.com>
Wed, 4 Jan 2012 16:12:44 +0000 (16:12 +0000)
commita33389c34e9dd9e4877dd96c5b189fc9d6230ff7
tree63d9bf351eb96ecfc42e975b702b8da3009dd4bd
parent4da8a5edbd7800568eb4af5adc118e174e876694
Rework locking for sched_adjust.

The main idea is to move (as much as possible) locking logic
from generic code to the various pluggable schedulers.

While at it, the following is also accomplished:
 - pausing all the non-current VCPUs of a domain while changing its
   scheduling parameters is not effective in avoiding races and it is
   prone to deadlock, so that is removed.
 - sedf needs a global lock for preventing races while adjusting
   domains' scheduling parameters (as it is for credit and credit2),
   so that is added.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/common/sched_credit.c
xen/common/sched_credit2.c
xen/common/sched_sedf.c
xen/common/schedule.c